package org.card.query;

/**
 * Created by card on 16/3/2.
 */
public class Page {

    private int offset;

    private int limit;

    public static Page getPage(int pageBegin, int pageSize) {
        Page page = new Page();
        page.setOffset((pageBegin - 1) * pageSize);
        page.setLimit(pageSize);
        return page;
    }

    public int getOffset() {
        return offset;
    }

    public void setOffset(int offset) {
        this.offset = offset;
    }

    public int getLimit() {
        return limit;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }
}
